<script lang="ts" setup>
import { ref } from 'vue'
import dep from './useEvent.js'
import type { Form, Watcher } from './useEvent.js'

class watcher implements Watcher {
  update(form: Form) {
    console.log('input', form)
  }
}
dep.add(new watcher())

const a = ref('a')
console.log(a.value, 1)
</script>
<template>
  <input v-model="a" @input="dep.notify"></input>
</template>
